/*
 * @Author: 吴世扬 18368095041@163.com
 * @Date: 2025-02-21 16:50:44
 * @LastEditors: 吴世扬 18368095041@163.com
 * @LastEditTime: 2025-02-24 08:21:17
 * @FilePath: /vue3-admin-server/src/entities/file.entity.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { Entity, Column } from 'typeorm';
import { BaseEntity } from './base.entity';
import { FileTypeEnum } from 'src/common/constants';

@Entity({
    name: 'upload_file'
})
export class FileEntity extends BaseEntity {
    @Column({ length: 64 })
    bucket: string;

    @Column({ length: 512 })
    name: string;

    @Column({ length: 1024 })
    path: string;

    @Column({ name: 'uploader_id' })
    uploaderId?: number;

    @Column({ type: 'int' })
    type: FileTypeEnum;

    @Column({ type: 'varchar', length: 255 })
    remark: string;
}
